const HAS_LOGIN =  "has_login_key";
const ACCESS_TOKEN = "access_token_key";
const REFRESH_TOKEN =  "refresh_token_key";
const USER_INFO = "user_info_obj";
const FACE_LOGIN = "face_login";
const FINGER_LOGIN =  "finger_login";
const CART_BACKBTN =  "cart_backbtn";
const AFTERSALE_DATA =  "aftersale_data";
export default {
	/**
	 * 写入openid
	 * @param {Object} val
	 */
	setOpenid(val) {
		uni.setStorageSync('openid', val);
	},
	/**
	 * 获取openid
	 * @param {Object} val
	 */
	getOpenid() {
		return uni.getStorageSync('openid');
	},
	/**
	 * 写入用户信息
	 * @param {Object} val
	 */
	setUserInfo(val) {
		uni.setStorageSync(USER_INFO, val);
	},
	/**
	 * 获取用户信息
	 */
	getUserInfo() {
		return uni.getStorageSync(USER_INFO);
	},
	/**
	 * 写入登录
	 * @param {Object} val
	 */
	setHasLogin(val) {
		uni.setStorageSync(HAS_LOGIN, val);
	},
	/**
	 * 获取是否登录
	 */
	getHasLogin() {
		return uni.getStorageSync(HAS_LOGIN);
	},
	/**
	 * 写入accessToken
	 * @param {Object} val
	 */
	setAccessToken(val) {
		uni.setStorageSync(ACCESS_TOKEN, val);
	},
	/**
	 * 获取accessToken
	 */
	getAccessToken() {
		return uni.getStorageSync(ACCESS_TOKEN);
	},
	/**
	 * 删除token
	 */
	removeAccessToken() {
		uni.removeStorageSync(ACCESS_TOKEN);
	},
	/**
	 * 写入刷新token
	 * @param {Object} val
	 */
	setRefreshToken(val) {
		uni.setStorageSync(REFRESH_TOKEN, val);
	},
	/**
	 * 获取刷新token
	 */
	getRefreshToken() {
		return uni.getStorageSync(REFRESH_TOKEN);
	},
	/**
	 * 删除token
	 */
	removeRefreshToken() {
		uni.removeStorageSync(REFRESH_TOKEN);
	},
};